package gui;

import java.awt.Color;
import javax.swing.JTextArea;
import modelcontroller.Conversation;

/**
 *
 * @author Mariam
 */
public class ConversationArea extends JTextArea {

    private Conversation c;

    public ConversationArea(Conversation c) {
        super(25, 50);
        this.c = c;
        initComponents();
    }

    private void initComponents() {
        this.setBackground(new Color(237, 237, 237));
        this.setEditable(false);
        this.setForeground(new Color(128, 0, 128));
    }

    public Conversation getConversation() {
        return c;
    }

    public static ConversationArea welcomeConversationArea(String username) {
        ConversationArea c = new ConversationArea(null);
        c.setText("  Hi " + username + " ! \n Please select a user to start chating :]\n\n ChatSystem v1 by Mariam");
        return c;
    }
}
